package com.ytjj.qmyx.admin.service.impl;

import com.ytjj.qmyx.admin.dao.DrawBedDao;
import com.ytjj.qmyx.admin.model.Admin;
import com.ytjj.qmyx.admin.service.DrawBedService;
import com.ytjj.qmyx.admin.service.MemberService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 *
 *
 * @Version: 1.0
 */
@Service
public class DrawBedServiceImpl implements DrawBedService {

	@Resource
	private DrawBedDao drawBedDao;

	@Resource
	private MemberService memberService;

	@Override
	public Integer addDrawBed(String name, String url) {
		Admin admin = memberService.getAdmin();
		return drawBedDao.addDrawBed(name, url, admin.getId(), admin.getName());
	}
}
